package com.lframework.xingyun.basedata.mappers;

import cn.hutool.core.util.StrUtil;
import com.lframework.starter.web.core.mapper.BaseMapper;
import com.lframework.xingyun.basedata.entity.ProductAssistance;
import com.lframework.xingyun.basedata.vo.product.assistance.QueryProductAssistanceVo;

import java.util.List;

/**
 * <p>
 * 商品辅料表 Mapper 接口
 * </p>
 *
 */
public interface ProductAssistanceMapper extends BaseMapper<ProductAssistance> {

    /**
     * 查询列表
     * @param vo
     * @return
     */
    default List<ProductAssistance> query(QueryProductAssistanceVo vo) {
        return defaultJoinWrapper()
                .eq(StrUtil.isNotBlank(vo.getProductMainId()), ProductAssistance::getProductMainId, vo.getProductMainId())
                .list();
    }


}

